<template>
    <div class="midCard flex">
        <div class="midc">
            <img src="../../assets/images/midcard/clothes.png" alt="">
            <a href="#">服饰</a>
        </div>
        <div class="midc">
            <img src="../../assets/images/midcard/comecs.png" alt="">
            <a href="#">美妆</a>
        </div>
        <div class="midc">
            <img src="../../assets/images/midcard/lessluxury.png" alt="">
            <a href="#">轻奢</a>
        </div>
        <div class="midc">
            <img src="../../assets/images/midcard/bag.png" alt="">
            <a href="#">箱包</a>
        </div>
        <div class="midc">
            <img src="../../assets/images/midcard/electronic.png" alt="">
            <a href="#">电子产品</a>
        </div>
        <div class="midc">
            <img src="../../assets/images/midcard/oversea.png" alt="">
            <a href="#">海外食品</a>
        </div>
        <div class="midc">
            <img src="../../assets/images/midcard/baby.png" alt="">
            <a href="#">母婴</a>
        </div>
        <div class="midc">
            <img src="../../assets/images/midcard/more.png" alt="">
            <a href="#">更多</a>
        </div>
    </div>
</template>

<script>
    export default {
        name: "MidCard",
        data() {
            return {

            }
        }
    }
</script>

<style lang="less">
.midCard{
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 0rem 0.6rem 0 0.6rem;
    .midc{
        // width: 20%;  这种写法没法在缩放
        // height: 10vh;
        width: 0.9rem;
        height: 0.9rem;
        margin-right: 0.7rem;
        margin-top: 0.5rem;
        margin-bottom: 0.2rem;
        background-color: #f00;
        border-radius: 0.2rem;
        text-align: center;
        img{
            width: 0.9rem;
            height: 0.9rem;
        }
        a{
            display: block;
            width: 1rem;
            margin-top: 0.1rem;
            font-size: 0.12rem;
            color: #193E5E;
        }
    }
    .midc:nth-child(4){
        margin-right: 0rem;
        // right: 0rem; 不能使用
    }
    .midc:nth-child(8){
        margin-right: 0rem;
        // right: 0rem; 不能使用
    }
}
    
</style>